package cn.sfrog.project.biz.admin.enums;



public enum BizUserTradeTypeEnum {

    /**
     * 充值
     */
    RECHARGE("1", "充值"),
    /**
     * 提现
     */
    WITHDRAW("2", "提现"),
    /**
     * 转赠
     */
    GIVE_AWAY("3", "转赠"),
    /**
     * 购买服务套餐
     */
    BUY_SERVICE("4", "购买服务套餐"),
    /**
     * 捐赠项目
     */
    DONATE("5", "捐赠项目"),
    /**
     * 保证金
     */
    ENSURE_MONEY("6", "缴纳保证金"),
    RETURN_MONEY("7", "保证金退费"),
    ORDER_COMMISSION("8", "服务订单抽成"),
    ORDER_CANCEL("9", "订单取消"),
    DISTRIBUTION("10", "分销"),
    STUDY_DISTRIBUTION("11", "学研项目分配");

    private String code;
    private String name;


    BizUserTradeTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public static BizUserTradeTypeEnum getInstance(String code) {
        BizUserTradeTypeEnum[] values = values();
        for (BizUserTradeTypeEnum bizUserTradeTypeEnum : values) {
            if (bizUserTradeTypeEnum.code.equals(code)) {
                return bizUserTradeTypeEnum;
            }
        }
        return null;
    }
}
